<cfcomponent>
	
	<cffunction name="init">
		<cfreturn this />
	</cffunction>
	
	<cffunction name="createComputer" access="public" returntype="Any">
		<cfscript>
		var local = structNew();
		
		local.monitor     = createObject('component','SinglePart').init("LCD Monitor"); 
		local.keyboard    = createObject('component','SinglePart').init("Italian Keyboard"); 
		local.processor   = createObject('component','SinglePart').init("Core 2 Processor"); 
		local.ram         = createObject('component','SinglePart').init("2 GB RAM"); 
		local.hardDisk    = createObject('component','SinglePart').init("400 Gb Hard Disk");
		
		local.mainSystem = createObject('component','CompoundPart').init( "Main System" ); 
		local.computer = createObject('component','CompoundPart').init("Computer"); 
		
		
		
		
		local.mainSystem.add( local.processor ); 
		local.mainSystem.add( local.ram ); 
		local.mainSystem.add( local.hardDisk ); 
		
		
		local.computer.add( local.monitor ); 
		local.computer.add( local.keyboard ); 
		local.computer.add( local.mainSystem );
		
		return local.computer;
		</cfscript>
	</cffunction>

</cfcomponent>